<?php
class Autoevaluacion_Form_Crearcronogramagnral extends Form_Base {
	
		
	public function __construct($options = null) {
		parent::__construct($options);
	}
	
	public function init() {
		//Crea el formulario para el registro de roles del sistema
		$this->setName ( 'cronogramas' );
		$this->setMethod("POST");
		
		$domConfig = Zend_Registry::get('domConfig'); //esto se crea en el bootstrap
		
		$array_elements[] = new Zend_Form_Element_Hidden("codcronograma");
		
		$element = new Zend_Form_Element_Text ( 'nombrecronograma' );
		$element->setLabel ( 'Nombre cronograma : ' );
		$element->setAttribs(array('size'=>50));
		$element->setRequired ( true );
		$element->addFilter ( 'StripTags' );
		$element->addFilter ( 'StringTrim' );
		$array_elements[]=$element;

		$element = new Zend_Form_Element_Text ( 'ano' );
		$element->setLabel ( 'Año ' );
		$element->setRequired ( true );
		$element->addFilter ( 'StripTags' );
		$element->addFilter ( 'StringTrim' );
		$element->addValidator('digits');
        $array_elements[]=$element;

		$element = new Zend_Form_Element_Textarea('observaciongnral');
		$element->setLabel('Observación');
		$element->setRequired(true);
		$element->addFilter('StripTags');
		$element->addFilter('StringTrim');
		$element->addFilter('StringToUpper');
		$element->setAttrib("rows",8);
		$element->setAttrib("style","width:99%");
		$element->addValidator('StringLength', false, array($domConfig->TEXTO_TAMANOMIN));
        $array_elements[] = $element;
		     
       $submit = new Zend_Form_Element_Submit('btnSubmit');
       $submit->setValue('Guardar');
       $submit->setLabel("Guardar");
       $submit->setAttrib("class", "iceCmdBtn");
       $array_elements[] = $submit;
       
       $this->addElements($array_elements);
	   $this->loadTableDecorators();
	}

}